package com.pocket.mic.common.util;

public class JsonPrint {
	
	public static String getErrorInfo() {
		return getJsonInfo("null", "-1", "error");
	}

	public static String getNullInfo(String returnCode, String returnMsg) {
		return getJsonInfo("null", returnCode, returnMsg);
	}
	
	public static String getJsonInfo(String data) {
		return getJsonInfo(data, "0", "ok");
	}
	
	public static String getJsonInfo(String data, String returnCode, String returnMsg) {
		if(null!=data&&!"".equals(data)){
			return "{\"data\":" + data + ",\"return_code\":" + returnCode + ",\"return_message\":\"" + returnMsg + "\"}";
		}else{
			return "{\"data\":\"null\""  + ",\"return_code\":" + returnCode + ",\"return_message\":\"" + returnMsg + "\"}";
		}
	}
	
//	public static String getSignErrorInfo() {
//		return getJsonInfo("null", SignConstant.SIGN_ERROR_CODE, SignConstant.SIGN_ERROR_INFO);
//	}
}
